from django.urls import path, include
from rest_framework.routers import DefaultRouter

from api.views import UserViewSet, TopicViewSet, AnnouncementViewSet

from django.conf import settings
from django.conf.urls.static import static

router = DefaultRouter()
router.register(r'user', UserViewSet, basename='user')
router.register(r'topics', TopicViewSet, basename='topic')
router.register(r'announcement', AnnouncementViewSet, basename='announcement')

urlpatterns = [
    path('', include(router.urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)